var http = require('http'),
	optfile = require('./optfile');

http.createServer(function (req, res){
	res.writeHead(200, {'Content-Type':'text/html, charset=utf-8'});
	if(req.url != "/favicon.ico"){
		// res.write('写入文件');
		function recall(data){
			res.write(data);
			res.end('');
		}
		optfile.writefile('./1.txt','我是写入文件1',recall);
		console.log('主程序执行完毕');
		// res.end('');
	}
}).listen(8000);